﻿using Common.Data.Extensions;
using Customer.Core.Configuration;
using Customer.Model.Model;

namespace Customer.Core.Data.DBConfig
{
    public class AccountPlanningProductHoldingConfiguration: DBConfig<AccountPlanningProductHolding>
    {
        public AccountPlanningProductHoldingConfiguration()
            : base(SystemConfiguration.Schema, SystemConfiguration.NamingType, SystemConfiguration.TABLE_PREFIX)
        {
            HasKey(k => new { k.Cif, k.Name, k.OrderNum });

            //relationship
            //HasRequired(t => t.Customer).WithMany(c => c.Cards).HasForeignKey(t => new { t.Cif }).WillCascadeOnDelete(false);
        }
    }
}
